package priv.cwr.springboot.demo.model.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;

/**
 * User: R
 * Date: 2018/8/30
 * Time: 9:12
 * Created with IntelliJ IDEA.
 */
@Data
public class DeptAddForm {
    @NotBlank(message = "{Dept.NotBlank.name}")
    @ApiModelProperty("部门名称")
    private String name;

    @JsonProperty("parent_id")
    @Range(min = 0, max = 99999999999L, message = "{Dept.Range.parentId}")
    @ApiModelProperty("父级部门id")
    private Long parentId;
}
